﻿using MrPP.Myth;
using MrPP.Restful;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MrPP.SerriedCabinet
{
    public class WindowPost : MonoBehaviour
    {
        [SerializeField]
        private Uri _uri = null;
        public void doAnchor(Transform trans)
        {
            var data = new AsgardPoseData(trans.gameObject);
            Bridge.Instance.post(WindowProcess.Instance.handle, "anchor", data.aPose);
        }
        public void doQrcode(string url)
        {
            _uri.value = url;
            //  _url = url;
            Bridge.Instance.post(WindowProcess.Instance.handle, "qrcode", _uri.value);
        }


        public void doVentilate()
        {
            Bridge.Instance.post(WindowProcess.Instance.handle, "ventilate");

        }
        public void doStart() {
            Bridge.Instance.post(WindowProcess.Instance.handle, "start");
        }
        public void doStop()
        {

            Bridge.Instance.post(WindowProcess.Instance.handle, "stop");
        }
        public void doClose()
        {

            Bridge.Instance.post(WindowProcess.Instance.handle, "close");
        }

        public void doOpen()
        {
            Bridge.Instance.post(WindowProcess.Instance.handle, "open");
        }
    }
}